Home:ALL Converter>Fundamental solution of homogeneous linear equations: Ax=0 with Det(A)=0 with MathNet

Fundamental solution of homogeneous linear equations: Ax=0 with Det(A)=0 with MathNet

Ask Time:2018-11-15T15:00:55         Author:Vladimir Belobrodskiy

Json Formatter

I am trying to solve a system of homogeneous linear equations like Ax=0. Here is an example matrix which has already been reduced for simplicity:

1 2 | 0
3 6 | 0

The solution I am hoping to get is at least [ 2, -1 ]. But the fundamental solution is [2C; -1C]. You can see that Det(A) = 0 and Rank(A) = 1. Of course you know that such systems have trivial solution [0,0].

I am trying:

Matrix<double> A = Matrix<double>.Build.DenseOfArray(new double[,]
{
    { 1, 2 },
    { 3, 6 }
});    
Vector<double> B = Vector<double>.Build.Dense(new double[] { 0, 0 });
var result = A.Solve(B); //result = Nan, Nan.

This solution doesn't work for my situation (B = 0, Det(A) = 0).

Author:Vladimir Belobrodskiy,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53314020/fundamental-solution-of-homogeneous-linear-equations-ax-0-with-deta-0-with-ma
yy